package cho.core;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.List;

public class SqlExtract {
	public static  List<String> read(){
		ArrayList<String> sqlText = new ArrayList<String>();
		LineNumberReader lr = null;
		String fileFullPath = "";
		String textLine = null;
		fileFullPath = ClassLoader.getSystemResource("cho/core/file/sql.sql").getPath();
		
		System.out.println(fileFullPath);
		
		try {
			lr = new LineNumberReader(new BufferedReader(new FileReader(new File(fileFullPath))));
			
			while((textLine = lr.readLine()) != null){
				sqlText.add(textLine.toUpperCase());
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return sqlText;
		
	}
	
	public static void main(String[] args) {
	}
}
